package com.guchenbo.lssp.domain;

import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.List;

/**
 * @author guchenbo
 */
public class LivyStatementOutputQo {
    private OutputStatus status;
    @JsonProperty(value = "execution_count")
    private Long executionCount;
    /**
     * 正确时候返回
     */
    private OutputData data;
    /**
     * 错误时候返回，error message
     */
    private String evalue;
    /**
     * 错误时候返回，error traceback
     */
    private List<String> traceback;

    public OutputStatus getStatus() {
        return status;
    }

    public void setStatus(OutputStatus status) {
        this.status = status;
    }

    public Long getExecutionCount() {
        return executionCount;
    }

    public void setExecutionCount(Long executionCount) {
        this.executionCount = executionCount;
    }

    public OutputData getData() {
        return data;
    }

    public void setData(OutputData data) {
        this.data = data;
    }

    public String getEvalue() {
        return evalue;
    }

    public void setEvalue(String evalue) {
        this.evalue = evalue;
    }

    public List<String> getTraceback() {
        return traceback;
    }

    public void setTraceback(List<String> traceback) {
        this.traceback = traceback;
    }

    public static class OutputData {
        @JsonProperty(value = "application/json")
        private OutputDataJson dataJson;

        public OutputDataJson getDataJson() {
            return dataJson;
        }

        public void setDataJson(OutputDataJson dataJson) {
            this.dataJson = dataJson;
        }
    }

    public static class OutputDataJson {
        private LivySchema schema;
        private List<Object[]> data;

        public LivySchema getSchema() {
            return schema;
        }

        public void setSchema(LivySchema schema) {
            this.schema = schema;
        }

        public List<Object[]> getData() {
            return data;
        }

        public void setData(List<Object[]> data) {
            this.data = data;
        }
    }
}
